- add_to_breadcrumbs @hook.pluralized_name, admin_hooks_path
- page_title _('Edit System Hook')

= render 'shared/web_hooks/hook_errors', hook: @hook

.gl-mt-5
  = render 'shared/web_hooks/title_and_docs', hook: @hook

  = gitlab_ui_form_for @hook, as: :hook, url: admin_hook_path do |f|
    = render partial: 'form', locals: { form: f, hook: @hook }

    .gl-display-flex.gl-justify-content-space-between
      %div
        = f.submit _('Save changes'), pajamas_button: true, class: 'gl-sm-mr-3'
        = render 'shared/web_hooks/test_button', hook: @hook
      = link_button_to _('Delete'), admin_hook_path(@hook), method: :delete, aria: { label: s_('Webhooks|Delete webhook') }, data: { confirm: s_('Webhooks|Are you sure you want to delete this webhook?'), confirm_btn_variant: 'danger' }, variant: :danger

%hr

= render partial: 'shared/hook_logs/index', locals: { hook: @hook, hook_logs: @hook_logs }
